//
//  LZCheckoutView.h
//  laziz_Consumer
//
//  Created by xbn_iMac on 2016/12/23.
//  Copyright © 2016年 XBN. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger ,PayCouponViewState) {
    PayCouponViewState_BeginShow,
    PayCouponViewState_SelectCoupon,
    PayCouponViewState_ShowQRCode,
    PayCouponViewState_PaySuccess,
    PayCouponViewState_Remove
};

@protocol PromotionPayDelegate <NSObject>

- (void)requestPromotionDateWithPrameter:(NSDictionary*)prameter resultSuccess:(void (^)(NSArray *result))successBlock;

@end

@interface LZCheckoutView : UIView

/**
 生成二维码所用的参数
 */
@property (nonatomic ,copy) NSString *disCountNo;   // 用户抢卷ID或用户参团ID
@property (nonatomic ,copy) NSString *promotionType;    // 优惠券  1 团购2

@property (nonatomic ,weak) id<PromotionPayDelegate> promotionPayDelegate;

@property (nonatomic ,copy) void (^stateBlock)(PayCouponViewState state);

@property (nonatomic ,copy) void (^reviewBlock)(NSString *sellerId, NSString *promotionId,NSString *noRemarkId);

@property (nonatomic ,assign) BOOL isUseCouponOpen;     // 如果是从优惠详情点开的

- (void)showViewWithState:(PayCouponViewState)state;

- (void)scanQRCodeSuccessWithSellerId:(NSString*)sellerId andPromotionId:(NSString*)promotionId andNoRemarkId:(NSString*)noRemarkId;

@end
